|
![](/i/fill.gif) |
Marcus Lundberg wrote:
>I'm using a 500x500 pixel .png to make a heightfield as a basis for a
>landscape I'm creating. The trouble is, the coloration is all patchy in
>places. This is not the regular problem of the normal flipping that can be
>solved by double-illuminate, and it has nothing to do with my texture map,
>since all I'm using is a green pigment (for right now, anyway). I've
>searched these newsgroups, and the responses I've seen all mention using
>smaller heightmaps. So I cut it down to 4 maps of half size, 250x250. But
>the scene still looks exactly the same, except now I have ugly seams where
>the heightfields join up.
>
>Could I be using double-illuminate wrongly? Any other ideas?
>
>//the scene file:
>camera{
> location <450,120,-450>
> look_at <0,-50,0>
>}
>
>
>
>/*
>camera{
> location <40,1300,-45>
> look_at <0,75,0>
>} */
>light_source{
> <2000,2000,-2000> color White
>}
>
>sky_sphere {
> pigment {
> gradient y
> color_map{
> [ 0.0 rgb <0.180392, 0.4, 0.913725> ]
> [ 1.0 rgb <0.541176, 0.74902, 1.0> ]
> }
> scale .4
> translate .7
> }
>}
>
>fog {
> distance 1000
> color rgbt<0.541176, 0.74902, 1.0,.35>
> }
>
>#declare Terrain=
>union{
>height_field{
> png "HMap.png" //this is the main heightfield
> double_illuminate // I've stuck this in elsewhere, but with no luck.
> smooth on
> water_level 0
> pigment{color rgb<0,.7,0> }
> finish{ambient .3}
>
>}
>height_field{
> png "HMap2.png" //this is just background
> // smooth on
> water_level 0
> pigment{color rgb<0,.7,0>}
> finish{ambient .3}
> translate<-1,0,0>
>}
>height_field{ //this is just background
> png "HMap3.png"
> // smooth on
> water_level 0
> pigment{color rgb<0,.7,0>}
> finish{ambient .3}
> translate<0,0,1>
>}
>height_field{ //this is just background
> png "HMap4.png"
> // smooth on
> water_level 0
> pigment{color rgb<0,.7,0>}
> finish{ambient .3}
> translate<-1,0,1>
>
>}
>}
>object{
> Terrain
> scale <1000,100,1000>//scale <1000,150,1000>
> translate <-500,0,-500>
> rotate<0,0,0>
>}
>
Well, I'm hardly an expert, and in fact I had a problem with heightfields
recently, too. I tried turning double-illuminate on, and turning off
smooth, both of which are supposed to help the problem of artifacts in
heightfields, but it didn't work. That's why I'm using isosurfaces now.
Still, I can think of a couple things to try. First of all, a 500x500 source
image isn't very large, and you're scaling it by 1000. The mesh polygons
are going to be huge. I don't know enough to really challenge the comment
that smaller source files will get rid of that problem, however it seems to
me that if you have smaller polygons in the end result, then the artifacts
are going to be smaller and perhaps less noticeable. If you can get a much
larger image for the source, like 5000x5000 or something, I'd say to try
that out. You probably won't even need to turn on smooth with a source
image that large. The downside is it would probably take a lot longer to
render.
Well, let the experts give you the more believable advice.
Post a reply to this message
|
![](/i/fill.gif) |